#ifndef _SENSOR_QMC5883_H_
#define _SENSOR_QMC5883_H_

#include <sensor.h>
#include "QMC5883.h"

#define QMC5883_I2C_BUSNAME "i2c2"

#define QMC5883_DEVICE_NAME "QMC5883"
#define QMC5883_VENDOR "QST" /* 矽睿科技 */

#define QMC5883_MAG_MAX_RANGE 30000     /* QMC5883最大量程30Gauss */
#define QMC5883_MAG_MIN_RANGE 2000      /* QMC5883最小量程2Gauss */
#define QMC5883_MAG_MIN_PERIOD_MS_RT 10 /* QMC5883测量最短时间 */
#define QMC5883_MAG_FIFO_BUF_MIN 6

/// @brief QMC5883初始化及注册到RT-Thread
/// @param cfg
/// @return 成功返回0
int8_t rt_hw_qmc5883_init(struct rt_sensor_config *cfg);

#endif